package com.neusoft.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.neusoft.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface UserDao extends BaseDao<User> {

    User queryById(Integer id);

    int changePassword(@Param("account") String account, @Param("password") String password);

    User login(@Param("account") String account, @Param("password") String password);

    List<User> queryAllByLimit(@Param("offset") int offset, @Param("limit") int limit, User bean);

    List<User> queryAll(IPage<User> page, @Param("bean") User bean);

    User getEmail(String email);

    User findByUserName(String account);

}
